package com.tank.game.core.play;

import com.tank.game.api.PlayBuilder;
import com.tank.game.api.Tank;

/**
 * 缺省的玩家
 *
 * @author Zed
 */
public class DefaultPlayBuilder implements PlayBuilder<PlayConfig> {

    private String id;

    private Tank tank;

    private PlayConfig playConfig;

    @Override
    public DefaultPlayBuilder id(String id) {
        this.id = id;
        return this;
    }

    @Override
    public DefaultPlayBuilder tank(Tank tank) {
        this.tank = tank;
        return this;
    }

    @Override
    public DefaultPlayBuilder config(PlayConfig config) {
        this.playConfig = config;
        return this;
    }

    public String getId() {
        return id;
    }

    public Tank getTank() {
        return tank;
    }

    /**
     * 获取玩家配置项
     *
     * @return {@link PlayConfig}
     */
    public PlayConfig getPlayConfig() {
        return playConfig;
    }
}
